package com.ossjk.api.controller;

import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.ossjk.core.base.controller.BaseController;
import com.ossjk.core.vo.ResponseBean;
import com.ossjk.oa.accounting.service.ICwCapitalsService;
import com.ossjk.oa.accounting.vo.MoneySumVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(description = "资金管理")
@RestController
@RequestMapping("/api")
public class FundMgtController extends BaseController {
    @Autowired
    private ICwCapitalsService iCwCapitalsService;

    @ApiOperation(value = "按照月份进行资金管理 通过银行账户分类", notes = "按照月份进行资金管理 通过银行账户分类")
    @GetMapping("Surplus")
    @ApiImplicitParam(name = "cptdate", value = "月份", paramType = "query", dataType = "String")
    public ResponseBean<List<MoneySumVo>> Surplus(String cptdate){
        Wrapper wrapper = Condition.create();
//        iCwCapitalsService.selectCapitalsByTypeC(wrapper);

        return  (ResponseBean<List<MoneySumVo>>) responseSuccess(iCwCapitalsService.selectSumGBBank(cptdate));
    }

}
